package org.jeeasy.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author AlpsDDJ
 * @date 2020/11/23 11:04
 */
@Getter
@AllArgsConstructor
public enum BooleanEnum implements IDictEnum<Integer> {

    // 已删除
    YES(1, "是", SUCCESS_COLOR),
    // 未删除
    NO(0, "否", DEFAULT_COLOR),
    ;

    private final Integer value;
    private final String text;
    private final String color;

    public static Integer yes() {
        return YES.getValue();
    }

    public static Integer no() {
        return NO.getValue();
    }

    public static boolean yes(Integer val) {
        return YES.getValue().equals(val);
    }
}
